﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CH3_1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("判断输入的年是否是闰年");
            int inputYear = 0;
            Console.Write("请输入所需计算的年份：");
            inputYear = Convert.ToInt16(Console.ReadLine());
            if ((inputYear % 4 == 0) && (inputYear % 100 != 0))
            {
                Console.WriteLine("{0} 年是闰年", inputYear);
            }
            else if (inputYear % 400 == 0)
            {
                Console.WriteLine("{0} 年是闰年", inputYear);
            }
            else
            {
                Console.WriteLine("{0} 年是平年", inputYear);
            }
            Console.ReadLine();
        }
    }
}
